<template>
	<view class="concent">
		<view class="reason">
			<u-radio-group v-model="radiovalue1" placement="column">
				<u-radio :customStyle="{marginBottom: '8px'}" v-for="(item, index) in radiolist1" :key="index"
					:label="item.name" :name="item.name" @change="radioChange(index)">
				</u-radio>
			</u-radio-group>


		</view>

		<view class="btn">
			<u-button @click="goComplaintDetails" type="primary" text="投诉卖家"></u-button>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				radiolist1: [{
						name: '1、卖家服务态度恶劣',
						disabled: false
					},
					{
						name: '2、拍摄质量粗糙',
						disabled: false
					}
				],
				currentIndex: ''
			}
		},
		methods: {
			radioChange(e) {
				this.currentIndex = e
				console.log(e);
			},
			goComplaintDetails() {
				if (this.currentIndex === '') {
					return uni.showToast({
						icon: 'none',
						title: '请选择投诉原因'
					})
				}
				uni.navigateTo({
					url: `/subPackages_tousu/ComplaintDetails/ComplaintDetails?id=${this.currentIndex}`
				})
			}

		}
	}
</script>

<style lang="scss">
	.reason {
		padding: 5%;
	}

	.btn {
		margin-left: 5%;
		width: 90%;
		height: 100rpx;
	}
</style>